<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>遮罩</title>

    <style>
        body {
            background: url(img/fj1.png);
        }

        .mask {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .box {
            width: 250px;
            height: 200px;
            background: url(./img/fj1.png);
            border-radius: 8px;
            position: relative;
        }

        .btn_close {
            position: absolute;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 1px solid black;
            text-align: center;
            line-height: 16px;
            top: -8px;
            right: -8px;
            cursor: pointer;
        }
    </style>

</head>

<body>
    <div class="mask"">
        <div class=" box">
        <div class="btn_close">×</div>
    </div>
    </div>
</body>
<script>
    let mask = document.querySelector('.mask');
    let closeBtn = document.querySelector('.btn_close');

    closeBtn.addEventListener('click', function () {
        mask.style.display = 'none';
    });

</script>

</html>